CHANNEL_TAX_ATTACHMENT = {
    'target_event_id': ['bet_order'],
    'values': [
        {
            "value_id": "_tax_amount",
            "target_value": "bet_order_tax_amount",
            "value_name": "税收",
            "filter": [
                {'term': {'_event_id': 'bet_order'}},
            ]
        },
        {
            "value_id": "_high_level_fish_bet_amount",
            "target_value": 'bet_order_bet_amount',
            "value_name": "高级鱼房投注金额",
            "filter": [
                {'term': {'_event_id': 'bet_order'}},
                {"term": {"bet_order_sub_type.keyword": "fish"}},
                {"terms": {"bet_order_third_type.keyword": ["fish_3", "fish_4", "3", "4"]}}
            ],
            "value_type": "float",
            "hide_result": True,
            "adjust_amount": True,
        },
        {
            "value_id": "_level_fish_bet_amount",
            "target_value": 'bet_order_bet_amount',
            "value_name": "非初级鱼房投注金额",
            "filter": [
                {'term': {'_event_id': 'bet_order'}},
                {"term": {"bet_order_sub_type.keyword": "fish"}},
                {"terms": {"bet_order_third_type.keyword": ["fish_2", "fish_3", "fish_4", "2", "3", "4"]}}
            ],
            "value_type": "float",
            "hide_result": True,
            "adjust_amount": True,
        },
        {
            "value_id": "_shz_bet_amount",
            "target_value": 'bet_order_bet_amount',
            "value_name": "水浒传投注金额",
            "filter": [
                {'term': {'_event_id': 'bet_order'}},
                {"term": {"bet_order_sub_type.keyword": "shz"}}
            ],
            "value_type": "float",
            "hide_result": True,
            "adjust_amount": True,
        },
        {
            "value_id": "channel_tax_amount",
            "value_name": "渠道税收",
            "value_expr": "_tax_amount + _high_level_fish_bet_amount * 0.015",
            "adjust_amount": True,
        },
        {
            "value_id": "real_channel_tax_amount",
            "value_name": "渠道真实税收",
            "value_expr": "_tax_amount + _level_fish_bet_amount * 0.05 + _shz_bet_amount * 0.05",
            "adjust_amount": True,
        }
    ]
}
